package com.zenithmind.common.config;

import com.zenithmind.common.security.FeignTokenInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Feign配置类
 * 提供Feign相关的配置
 */
@Configuration
public class FeignConfiguration {

    /**
     * RestTemplate Bean
     * 用于服务间HTTP请求
     */
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
    
    /**
     * Feign Token拦截器
     * 用于向Feign请求添加认证信息
     */
    @Bean
    public FeignTokenInterceptor feignTokenInterceptor() {
        return new FeignTokenInterceptor();
    }
} 